<?php
/**
 * Created by PhpStorm.
 * User: 12133
 * Date: 2025/1/2
 * Time: 14:41
 */

namespace app\controller\home;


use app\model\home\Content;
use app\model\home\Nav;
use app\model\home\Website;

class Lists extends Base
{
    public function web(){
        $where = [];
        $list = Website::where($where)
            ->paginate([
                'page' => $this->page,
                'list_rows' => $this->size
            ]);
        return $this->view('/home/list/web',['list' => $list]);
    }

    public function nav(){
        $where[] = ['pid','=',0];
        $list = Nav::where($where)
            ->order('website_id DESC')
            ->paginate([
                'page' => $this->page,
                'list_rows' => $this->size
            ]);
        return $this->view('/home/list/nav',['list' => $list]);
    }

    public function info(){
        $where = [];
        $list = Content::where($where)
            ->order('website_id DESC')
            ->paginate([
                'page' => $this->page,
                'list_rows' => $this->size
            ]);
        return $this->view('/home/list/info',['list' => $list]);
    }
}